<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>GeoExt.data.PrintPage &mdash; GeoExt v1.1</title>
    <link rel="stylesheet" href="../../../_static/geoext.css" type="text/css" />
    <link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../../../',
        VERSION:     '1.1',
        COLLAPSE_MODINDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../../../_static/jquery.js"></script>
    <script type="text/javascript" src="../../../_static/doctools.js"></script>
    <link rel="shortcut icon" href="../../../_static/favicon.ico"/>
    <link rel="top" title="GeoExt v1.1" href="../../../index.html" />
    <link rel="up" title="GeoExt.data" href="../data.html" />
    <link rel="next" title="GeoExt.data.PrintProvider" href="PrintProvider.html" />
    <link rel="prev" title="GeoExt.data.LayerStore" href="LayerStore.html" />
    
    
    
    
    

  </head>
  <body>
    <div class="header">
        <div class="wrap">
            <h1 id="logo"><a href="../../../index.html">GeoExt</a></h1>
            <ul id="top-nav">
                <li class="first"><a href="../../../docs.html">Documentation</a></li>
                <li><a href="../../../examples.html">Examples</a></li>
                <li><a href="../../../downloads.html">Download</a></li>
                <li><a href="http://trac.geoext.org/">Development</a></li>
            </ul>
            <div id="searchbox">
                <form class="search" action="../../../search.html" method="get">
                    <input id="searchbox-query" type="text" name="q" size="25" value="Search &hellip;" tabindex="3" onblur="if(this.value=='') this.value='Search &hellip;';" onfocus="if(this.value=='Search &hellip;') this.value='';" />
                    <input id="searchbox-submit" type="image" value="Search" src="../../../_static/img/search_icon_green.png" />
                    <input type="hidden" name="check_keywords" value="yes" />
                    <input type="hidden" name="area" value="default" />
                </form>
            </div>
        </div>
    </div>

    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li><a href="../../../index.html">GeoExt</a> &raquo;</li>
          <li><a href="../../index.html" >API Reference</a> &raquo;</li>
          <li><a href="../data.html" accesskey="U"><tt class="docutils literal docutils literal docutils literal docutils literal docutils literal docutils literal docutils literal docutils literal docutils literal docutils literal docutils literal"><span class="pre">GeoExt.data</span></tt></a> &raquo;</li>
        <li><a href="#"><tt class="docutils literal docutils literal"><span class="pre">GeoExt.data.PrintPage</span></tt></a></li>
      </ul>
    </div>

      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
            <h3><a href="../../../index.html">Table Of Contents</a></h3>
            <ul>
<li><a class="reference external" href="#"><tt class="docutils literal"><span class="pre">GeoExt.data.PrintPage</span></tt></a><ul>
<li><a class="reference external" href="#config-options">Config Options</a></li>
<li><a class="reference external" href="#public-properties">Public Properties</a></li>
<li><a class="reference external" href="#public-methods">Public Methods</a></li>
<li><a class="reference external" href="#events">Events</a></li>
</ul>
</li>
</ul>

            <h4>Previous topic</h4>
            <p class="topless"><a href="LayerStore.html"
                                  title="previous chapter"><tt class="docutils literal docutils literal docutils literal"><span class="pre">GeoExt.data.LayerStore</span></tt></a></p>
            <h4>Next topic</h4>
            <p class="topless"><a href="PrintProvider.html"
                                  title="next chapter"><tt class="docutils literal"><span class="pre">GeoExt.data.PrintProvider</span></tt></a></p>
        </div>
      </div>


    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="geoext-data-printpage">
<h1><a title="GeoExt.data.PrintPage" class="reference internal" href="#GeoExt.data.PrintPage"><tt class="xref docutils literal"><span class="pre">GeoExt.data.PrintPage</span></tt></a><a class="headerlink" href="#geoext-data-printpage" title="Permalink to this headline">¶</a></h1>
<dl class="meta docutils">
<dt>Extends</dt>
<dd><ul class="first last simple">
<li><a class="reference external" href="http://dev.sencha.com/deploy/dev/docs/?class=Ext.util.Observable">Ext.util.Observable</a></li>
</ul>
</dd>
</dl>
<dl class="class">
<dt id="GeoExt.data.PrintPage">
<em class="property">class </em><tt class="descclassname">GeoExt.data.</tt><tt class="descname">PrintPage</tt><a class="headerlink" href="#GeoExt.data.PrintPage" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<p>Provides a representation of a print page for
<a title="GeoExt.data.PrintProvider" class="reference external" href="PrintProvider.html#GeoExt.data.PrintProvider"><tt class="xref docutils literal"><span class="pre">GeoExt.data.PrintProvider</span></tt></a>. The extent of the page is stored as
<tt class="docutils literal"><span class="pre">OpenLayers.Feature.Vector</span></tt>. Widgets can use this to display the print
extent on the map.</p>
<div class="section" id="config-options">
<h2>Config Options<a class="headerlink" href="#config-options" title="Permalink to this headline">¶</a></h2>
<p>Configuration properties in addition to
those listed for <a class="reference external" href="http://dev.sencha.com/deploy/dev/docs/?class=Ext.util.Observable">Ext.util.Observable</a>.</p>
<dl class="describe">
<dt>
<tt class="descname">customParams</tt></dt>
<dd><tt class="docutils literal"><span class="pre">Object</span></tt> Key-value pairs of additional parameters that the
printProvider will send to the print service for this page.</dd></dl>

<dl class="describe">
<dt>
<tt class="descname">printProvider</tt></dt>
<dd><a title="GeoExt.data.PrintProvider" class="reference external" href="PrintProvider.html#GeoExt.data.PrintProvider"><tt class="xref docutils literal"><span class="pre">GeoExt.data.PrintProvider</span></tt></a> The print provider to use with
this page.</dd></dl>

</div>
<div class="section" id="public-properties">
<h2>Public Properties<a class="headerlink" href="#public-properties" title="Permalink to this headline">¶</a></h2>
<p>Public properties in addition to those
listed for <a class="reference external" href="http://dev.sencha.com/deploy/dev/docs/?class=Ext.util.Observable">Ext.util.Observable</a>.</p>
<dl class="attribute">
<dt id="GeoExt.data.PrintPage.center">
<tt class="descclassname">PrintPage.</tt><tt class="descname">center</tt><a class="headerlink" href="#GeoExt.data.PrintPage.center" title="Permalink to this definition">¶</a></dt>
<dd><tt class="docutils literal"><span class="pre">OpenLayers.LonLat</span></tt> The current center of the page. Read-only.</dd></dl>

<dl class="attribute">
<dt id="GeoExt.data.PrintPage.customParams">
<tt class="descclassname">PrintPage.</tt><tt class="descname">customParams</tt><a class="headerlink" href="#GeoExt.data.PrintPage.customParams" title="Permalink to this definition">¶</a></dt>
<dd><tt class="docutils literal"><span class="pre">Object</span></tt> Key-value pairs of additional parameters that the
printProvider will send to the print service for this page.</dd></dl>

<dl class="attribute">
<dt id="GeoExt.data.PrintPage.feature">
<tt class="descclassname">PrintPage.</tt><tt class="descname">feature</tt><a class="headerlink" href="#GeoExt.data.PrintPage.feature" title="Permalink to this definition">¶</a></dt>
<dd><tt class="docutils literal"><span class="pre">OpenLayers.Feature.Vector</span></tt> Feature representing the page extent. To
get the extent of the print page for a specific map, use
<tt class="docutils literal"><span class="pre">getPrintExtent</span></tt>.
Read-only.</dd></dl>

<dl class="attribute">
<dt id="GeoExt.data.PrintPage.rotation">
<tt class="descclassname">PrintPage.</tt><tt class="descname">rotation</tt><a class="headerlink" href="#GeoExt.data.PrintPage.rotation" title="Permalink to this definition">¶</a></dt>
<dd><tt class="docutils literal"><span class="pre">Float</span></tt> The current rotation of the page. Read-only.</dd></dl>

<dl class="attribute">
<dt id="GeoExt.data.PrintPage.scale">
<tt class="descclassname">PrintPage.</tt><tt class="descname">scale</tt><a class="headerlink" href="#GeoExt.data.PrintPage.scale" title="Permalink to this definition">¶</a></dt>
<dd><tt class="docutils literal"><span class="pre">Ext.data.Record</span></tt> The current scale record of the page. Read-only.</dd></dl>

</div>
<div class="section" id="public-methods">
<h2>Public Methods<a class="headerlink" href="#public-methods" title="Permalink to this headline">¶</a></h2>
<p>Public methods in addition to those
listed for <a class="reference external" href="http://dev.sencha.com/deploy/dev/docs/?class=Ext.util.Observable">Ext.util.Observable</a>.</p>
<dl class="method">
<dt id="GeoExt.data.PrintPage.fit">
<tt class="descclassname">PrintPage.</tt><tt class="descname">fit</tt><big>(</big><big>)</big><a class="headerlink" href="#GeoExt.data.PrintPage.fit" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><em>fitTo</em> &#8211; <a title="GeoExt.MapPanel" class="reference external" href="../widgets/MapPanel.html#GeoExt.MapPanel"><tt class="xref docutils literal"><span class="pre">GeoExt.MapPanel</span></tt></a> or <tt class="docutils literal"><span class="pre">OpenLayers.Map</span></tt> or <tt class="docutils literal"><span class="pre">OpenLayers.Feature.Vector</span></tt>
The map or feature to fit the page to.</li>
<li><em>options</em> &#8211; <tt class="docutils literal"><span class="pre">Object</span></tt> Additional options to determine how to fit</li>
</ul>
</td>
</tr>
</tbody>
</table>
<p>Fits the page layout to a map or feature extent. If the map extent has
not been centered yet, this will do nothing.</p>
<p>Available options:</p>
<ul class="simple">
<li>mode - <tt class="docutils literal"><span class="pre">String</span></tt> How to calculate the print extent? If &#8220;closest&#8221;,
the closest matching print extent will be chosen. If &#8220;printer&#8221;, the
chosen print extent will be the closest one that can show the entire
<tt class="docutils literal"><span class="pre">fitTo</span></tt> extent on the printer. If &#8220;screen&#8221;, it will be the closest
one that is entirely visible inside the <tt class="docutils literal"><span class="pre">fitTo</span></tt> extent. Default is
&#8220;printer&#8221;.</li>
</ul>
</dd></dl>

<dl class="method">
<dt id="GeoExt.data.PrintPage.getPrintExtent">
<tt class="descclassname">PrintPage.</tt><tt class="descname">getPrintExtent</tt><big>(</big><big>)</big><a class="headerlink" href="#GeoExt.data.PrintPage.getPrintExtent" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>map</em> &#8211; <tt class="docutils literal"><span class="pre">OpenLayers.Map</span></tt> or <a title="GeoExt.MapPanel" class="reference external" href="../widgets/MapPanel.html#GeoExt.MapPanel"><tt class="xref docutils literal"><span class="pre">GeoExt.MapPanel</span></tt></a> the map to
get the print extent for.</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body"><tt class="docutils literal"><span class="pre">OpenLayers.Bounds</span></tt></td>
</tr>
</tbody>
</table>
<p>Gets this page&#8217;s print extent for the provided map.</p>
</dd></dl>

<dl class="method">
<dt id="GeoExt.data.PrintPage.setCenter">
<tt class="descclassname">PrintPage.</tt><tt class="descname">setCenter</tt><big>(</big><big>)</big><a class="headerlink" href="#GeoExt.data.PrintPage.setCenter" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>center</em> &#8211; <tt class="docutils literal"><span class="pre">OpenLayers.LonLat</span></tt> The new center.</td>
</tr>
</tbody>
</table>
<p>Moves the page extent to a new center.</p>
</dd></dl>

<dl class="method">
<dt id="GeoExt.data.PrintPage.setRotation">
<tt class="descclassname">PrintPage.</tt><tt class="descname">setRotation</tt><big>(</big><big>)</big><a class="headerlink" href="#GeoExt.data.PrintPage.setRotation" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><em>rotation</em> &#8211; <tt class="docutils literal"><span class="pre">Float</span></tt> The new rotation.</li>
<li><em>force</em> &#8211; <tt class="docutils literal"><span class="pre">Boolean</span></tt> If set to true, the rotation will also be
set when the layout does not support it. Default is false.</li>
</ul>
</td>
</tr>
</tbody>
</table>
<p>Sets a new rotation for the page geometry.</p>
</dd></dl>

<dl class="method">
<dt id="GeoExt.data.PrintPage.setScale">
<tt class="descclassname">PrintPage.</tt><tt class="descname">setScale</tt><big>(</big><big>)</big><a class="headerlink" href="#GeoExt.data.PrintPage.setScale" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><em>scale</em> &#8211; <tt class="docutils literal"><span class="pre">Ext.data.Record</span></tt> The new scale record.</li>
<li><em>units</em> &#8211; <tt class="docutils literal"><span class="pre">String</span></tt> map units to use for the scale calculation.
Optional if the <tt class="docutils literal"><span class="pre">feature</span></tt> is on a layer which is added to a map.
If not found, &#8220;dd&#8221; will be assumed.</li>
</ul>
</td>
</tr>
</tbody>
</table>
<p>Updates the page geometry to match a given scale. Since this takes the
current layout of the printProvider into account, this can be used to
update the page geometry feature when the layout has changed.</p>
</dd></dl>

</div>
<div class="section" id="events">
<h2>Events<a class="headerlink" href="#events" title="Permalink to this headline">¶</a></h2>
<p>Events in addition to those
listed for <a class="reference external" href="http://dev.sencha.com/deploy/dev/docs/?class=Ext.util.Observable">Ext.util.Observable</a>.</p>
<dl class="describe">
<dt>
<tt class="descname">change</tt></dt>
<dd><p>Triggered when any of the page properties have changed</p>
<p>Listener arguments:</p>
<ul>
<li><p class="first">printPage - <a title="GeoExt.data.PrintPage" class="reference internal" href="#GeoExt.data.PrintPage"><tt class="xref docutils literal"><span class="pre">GeoExt.data.PrintPage</span></tt></a> this printPage</p>
</li>
<li><dl class="first docutils">
<dt>modifications - <tt class="docutils literal"><span class="pre">Object</span></tt> Object with one or more of</dt>
<dd><p class="first last"><tt class="docutils literal"><span class="pre">scale</span></tt>, <tt class="docutils literal"><span class="pre">center</span></tt> and <tt class="docutils literal"><span class="pre">rotation</span></tt>, notifying
listeners of the changed properties.</p>
</dd>
</dl>
</li>
</ul>
</dd></dl>

</div>
</div>


          </div>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
            <li class="right" style="margin-right: 10px">
              <a href="../../../genindex.html" title="General Index"
                 accesskey="I">index</a></li>
            <li class="right" >
              <a href="../../../modindex.html" title="Global Module Index"
                 accesskey="M">modules</a> |</li>
            <li class="right" >
              <a href="PrintProvider.html" title="GeoExt.data.PrintProvider"
                 accesskey="N">next</a> |</li>
            <li class="right" >
              <a href="LayerStore.html" title="GeoExt.data.LayerStore"
                 accesskey="P">previous</a> |</li>
        <li><a href="../../../index.html">GeoExt</a> &raquo;</li>
          <li><a href="../../index.html" >API Reference</a> &raquo;</li>
          <li><a href="../data.html" ><tt class="docutils literal docutils literal docutils literal docutils literal docutils literal docutils literal docutils literal docutils literal docutils literal docutils literal docutils literal"><span class="pre">GeoExt.data</span></tt></a> &raquo;</li>
        <li><a href="#"><tt class="docutils literal docutils literal"><span class="pre">GeoExt.data.PrintPage</span></tt></a></li>
      </ul>
    </div>

    <div class="footer">
      &copy; Copyright 2009-2010, GeoExt Community.
    </div>
  </body>
</html>